﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OopDemo
{
    /// <summary>
    /// 梯形
    /// </summary>
    public class Trapezoid : Quadrilatera
    {
        public override void DrawSelf()
        {
            Console.WriteLine("梯形");
            for (var i = 0; i < Height; i++)
            {
                var width = Width - i*2;
                var space = i;
                while (space > 0)
                {
                    Console.Write(" ");
                    space--;
                }
                for (var j = 0; j < width; j++)
                {
                    Console.Write("W");
                }
                Console.WriteLine();
            }
        }
    }
}
